{%include file="header.html"%}
<form action="{%$formAction%}" method="POST" {%if $is_validator%} id="adminform" onsubmit="return Validator.Validate(this)" {%/if%}>
<input type="hidden" name="menu_id" value="{%$menu.menu_id%}">
<table width="100%" border="0"  class="adminform">
  <tr>
    <th align="left">父菜单</th>
  </tr>
  <tr>
    <td align="left"><label>
      <select name="menu[top_id]">
        <option value="0">顶级菜单</option>
            {%foreach from=$menus item="row"%}
            <option value="{%$row.menu_id%}" {%if $row.menu_id==$menu.top_id%} selected {%/if%}>{%$row.menu_name%}</option>
         {%/foreach%}
      </select>
      </label></td>
  </tr>
  <tr>
    <th align="left">名称</th>
  </tr>
  <tr>
      
      <td><label>
        <input type="text" class="text" name="menu[menu_name]" id="form[menu_name]"  value="{%$menu.menu_name%}" dataType="Require" msg='名称必填'/>
      </label></td>
    </tr>
     <tr><th align="left">URL</th></tr>
    <tr>
     
      <td><input type="text" class="text" name="menu[menu_url]" id="form[menu_url]" value="{%$menu.menu_url%}" /></td>
    </tr>
    <tr><th align="left">排序</th>
    </tr>
    <tr>
     
      <td align="left"><input name="menu[menu_order]" type="text" class="text"id="form[menu_order]" size="6"  value="{%$menu.menu_order|default:0%}"/></td>
    </tr>
    <tr><th align="left">角色</th></tr>
    <tr>
     
      <td align="left">
        {%html_checkboxes name="groups" options=$group selected=$menu_roles separator="&nbsp;"%}
      </td>
    </tr>
    <tr>
      <td colspan="2" align="left"><label>
        <input type="submit"  id="button" value="提交" class="button"/>
      </label></td>
  </tr>
</table>
</form>